﻿using System;

namespace DotNetNeural.Data.Base
{
    public class Interval<T> where T : IComparable<T>
    {
        public T Left { get; private set; }
        public T Right { get; private set; }

        public Interval(T left, T right)
        {
            if (left.CompareTo(right) > 0)
                throw new ArgumentException("Illegal borders. Left must be less or equal then right");

            Left = left;
            Right = right;
        }
    }
}
